package com.liu.lab10.dao.impl;

import com.liu.lab10.dao.UserDao;

public class UserDaoImpl implements UserDao {
    private int id;
    private String username;
    public void info(String id,String name){
        System.out.println("userDaoImpl"+id+":"+name);
    }

    @Override
    public String toString() {
        return "UserDaoImpl{" +
                "id=" + id +
                ", username='" + username + '\'' +
                '}';
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public boolean login(String id,String name){
        if(id.equals("23") && name.equals("userDao")){
            System.out.println("UserDaoImpl+登录成功");
            return true;
        }
        else{
            return false;
        }
    }
}
